package com.zjf.addresschk.entity;

import com.zjf.addresschk.SnCal;

import java.io.UnsupportedEncodingException;

/**
 * 百度接口参数
 * Created by windows on 2015/5/20.
 */
public class InfBaidu extends InfAbstract{
    private String address;
    private String ak;
    private String sk;
    private String interfaceUrl;

    public String getAk() {
        return ak;
    }

    public void setAk(String ak) {
        this.ak = ak;
    }

    public String getSk() {
        return sk;
    }

    public void setSk(String sk) {
        this.sk = sk;
    }

    public String getInterfaceUrl() {
        return interfaceUrl;
    }

    public void setInterfaceUrl(String interfaceUrl) {
        this.interfaceUrl = interfaceUrl;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public InfBaidu(String ak, String sk,String interfaceUrl) {
        this.ak = ak;
        this.sk = sk;
        this.interfaceUrl = interfaceUrl;
    }

    public String getSn() throws UnsupportedEncodingException {
        return SnCal.getSn(this.getAddress(),this.getAk(),this.getSk());
    }
}
